package com.jd.jobkeeper.client.http;

/**
 * HTTP响应
 */
public class HttpResponse {
    //响应码
    private int status;
    //内容
    private String body;
    //修改时间
    private String lastModified;

    public HttpResponse(int status, String body, String lastModified) {
        this.status = status;
        this.body = body;
        this.lastModified = lastModified;
    }

    public int getStatus() {
        return status;
    }

    public String getBody() {
        return body;
    }

    public String getLastModified() {
        return lastModified;
    }

    public boolean isEmpty() {
        return body == null || body.isEmpty();
    }

    @Override
    public String toString() {
        return "HttpResponse{" +
                "status=" + status +
                ", body='" + body + '\'' +
                ", lastModified=" + lastModified +
                '}';
    }
}